﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Honestysoft.Financing.Model;

namespace Honestysoft.Financing.WebUI.Module.Contract
{
    public class Utils
    {
        /// <summary>
        /// 页面之间传输树模块的参数名
        /// </summary>
        public const string ParamName_ContractTreeModule = "TreeModule";
        /// <summary>
        /// 页面之间传输树节点类型的参数名
        /// </summary>
        public const string ParamName_ContractNodeType = "NodeType";

        /// <summary>
        /// 项目树模块
        /// </summary>
        public enum ContractTreeModule
        {
            /// <summary>
            /// 合同库
            /// </summary>
            Contract,
            /// <summary>
            /// 变更
            /// </summary>
            Change,
            /// <summary>
            /// 支付
            /// </summary>
            Payment,
            /// <summary>
            /// 初始化确定
            /// </summary>
            InitConfirm,
            /// <summary>
            /// 资料接收表
            /// </summary>
            DocReceive
        }
        /// <summary>
        /// 项目树节点类型
        /// </summary>
        public enum ContractTreeNodeType
        {
            /// <summary>
            /// 根节点
            /// </summary>
            Root,
            /// <summary>
            /// 项目类别
            /// </summary>
            ProjectCategory,
            /// <summary>
            /// 项目
            /// </summary>
            Project,
            /// <summary>
            /// 合同类别
            /// </summary>
            ContractCategory,
            /// <summary>
            /// 合同
            /// </summary>
            Contract
        }

        //public class ContractSession
        //{
        //    /// <summary>
        //    /// Session中的项目对象
        //    /// </summary>
        //    public static BD_Contract Contract
        //    {
        //        get
        //        {
        //            if (HttpContext.Current.Session["Contract"] != null)
        //            {
        //                return (BD_Contract)HttpContext.Current.Session["Contract"];
        //            }
        //            return null;
        //        }
        //        set
        //        {
        //            HttpContext.Current.Session["Contract"] = value;
        //        }
        //    }
        //    /// <summary>
        //    /// 清除Session中的流程对象
        //    /// </summary>
        //    public static void Clear()
        //    {
        //        if (HttpContext.Current.Session["Contract"] != null)
        //        {
        //            HttpContext.Current.Session.Remove("Contract");
        //        }
        //    }
        //}
    }
}